package mtn.bowen.yan.server.model;

import lombok.*;

import java.util.Date;

/**
 * @author <a href=mailto:yanbowen90@foxmail.com> bowen.yan </a>
 * @version 1.0
 * @description: TODO
 * @date 2021-11-04 11:14 PM
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Builder
public class FoodRank implements Comparable<FoodRank> {

    /**
     * uuid
     */
    private String uuid;

    /**
     * 种类
     */
    private Integer kind;

    /**
     * 菜名
     */
    private String name;

    /**
     * 大厨名字
     */
    private String chef;

    /**
     * 点赞 true 1,拍砖 false 0
     */
    private Boolean state;

    /**
     * 累计次数
     */
    private Integer count;

    /**
     * 降序
     *
     * @param foodRank 菜品信息
     * @return 降序排序
     */
    @Override
    public int compareTo(FoodRank foodRank) {
        return foodRank.kind - this.kind;
    }
}
